package com.zn.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Description customer send to service.
 * @Author zhaoning
 * @Date 2024/7/19
 */
@Data
@TableName(value = "user_record")
@NoArgsConstructor
@AllArgsConstructor
public class UserRecord {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("to_id")
    private Integer fromId;

    @TableField("message")
    private String message;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_at")
    private LocalDateTime createAt;
}
